<?php

namespace backend\models;

use Yii;

/**
 * This is the model class for table "{{%doctor}}".
 *
 * @property string $id
 * @property integer $u_id
 * @property string $name
 * @property string $title
 * @property string $head_pic
 * @property string $live_pic
 * @property string $introduce
 * @property string $birthday
 * @property string $alipay
 * @property string $address
 * @property string $work_unit
 * @property integer $status
 * @property integer $score
 * @property integer $response_times
 * @property integer $follow_numbers
 */
class Doctor extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return '{{%doctor}}';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['u_id', 'status', 'score', 'response_times', 'follow_numbers'], 'integer'],
            [['introduce'], 'string'],
            [['birthday'], 'safe'],
            [['name', 'alipay'], 'string', 'max' => 50],
            [['title', 'head_pic', 'live_pic', 'address', 'work_unit'], 'string', 'max' => 255],
            [['u_id'], 'unique'],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'u_id' => 'U ID',
            'name' => 'Name',
            'title' => 'Title',
            'head_pic' => 'Head Pic',
            'live_pic' => 'Live Pic',
            'introduce' => 'Introduce',
            'birthday' => 'Birthday',
            'alipay' => 'Alipay',
            'address' => 'Address',
            'work_unit' => 'Work Unit',
            'status' => 'Status',
            'score' => 'Score',
            'response_times' => 'Response Times',
            'follow_numbers' => 'Follow Numbers',
        ];
    }
}
